import request from '@/utils/request'


/*查询优惠券列表*/
export function marketingListApi(query) {
  return request({
    url: '/marketing/getCoupon',
    method: 'get',
    params: query
  })
}

/*根据id单独删除优惠券*/
export function couponDeleteByIdApi(couponId) {
  return request({
    url: '/marketing/deleteCoupon/' + couponId,
    method: 'delete',
  })
}


/*批量删除优惠券*/
export function couponDeleteBatchApi(data) {
  return request({
    url: '/marketing/deleteCoupon/',
    method: 'delete',
    data: data
  })
}

/*修改优惠券状态*/
export function couponIssueStatusApi(data) {
  return request({
    url: '/marketing/saveOrUpdateCoupon',
    method: 'post',
    data: data
  })
}

export function couponCreateApi(data) {
  return request({
    url: '/marketing/saveCoupon',
    method: 'post',
    data: data
  })
}

export function couponCopyApi(id) {
  return request({
    url: '/marketing/copyCoupon/' + id,
    method: 'post',
  })
}
